package com.huage.courseplatform.application.controller;

import cn.dev33.satoken.annotation.SaCheckRole;
import cn.dev33.satoken.annotation.SaIgnore;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.huage.courseplatform.application.model.dto.SysMenuDTO;
import com.huage.courseplatform.application.model.entity.SysMenu;
import com.huage.courseplatform.application.model.param.DictPARAM;
import com.huage.courseplatform.application.service.MenuService;
import com.huage.courseplatform.framework.api.BaseController;
import com.huage.courseplatform.framework.model.param.PagePARAM;
import com.huage.courseplatform.framework.utils.ResultUtils;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/menu")
@Api(tags = "菜单管理接口")
@Slf4j
@SaCheckRole("ROLE_ADMIN")
public class MenuController extends BaseController<SysMenu, SysMenuDTO,DictPARAM, MenuService> {


    @Override
    @SaIgnore
    public ResultUtils<Page<SysMenuDTO>> getByPage(@RequestBody PagePARAM pagePARAM) throws IllegalAccessException {
        return super.getByPage(pagePARAM);
    }
}
